package cn.xttc.edu.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author 杨磊
 * @since 2022-03-11
 */
@Data
@Accessors(chain = true)
@ToString
@TableName("orders")
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 订单id 年月日时分秒+4位随机数
     */
    @TableId(value = "id")
    private String id;

    /**
     * 客户id
     */
    @TableField("c_id")
    private Integer cId;

    /**
     * 司机id
     */
    @TableField("d_id")
    private Integer dId;

    /**
     * 订单状态 0，待接单，1进行中，2已完成, 3已取消
     */
    @TableField("status")
    private Integer status;

    /**
     * 订单创建时间
     */
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 预约时间
     */
    @TableField("appointment_time")
    private LocalDateTime appointmentTime;

    /**
     * 完成时间
     */
    @TableField("completion_time")
    private LocalDateTime completionTime;

    /**
     * 起点
     */
    @TableField("start_point")
    private String startPoint;

    /**
     * 终点
     */
    @TableField("end_point")
    private String endPoint;

    /**
     * 运输距离 单位公里(km)
     */
    @TableField("distance")
    private Double distance;

    /**
     * 订单费用
     */
    @TableField("price")
    private BigDecimal price;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 车辆id
     */
    @TableField("car_id")
    private Integer carId;

}
